package com.ruoyi.eam.controller;

import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.eam.doman.User;
import com.ruoyi.eam.service.IRoleService;
import com.ruoyi.eam.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/roles")
public class RoleController extends BaseController {

    @Autowired
    private IRoleService iRoleService;


    //根据用户编号查找指定用户
    @GetMapping(value = "/{roleId}")
    public AjaxResult getRole(@PathVariable("roleId") Long roleId)
    {
        return success(iRoleService.selectRoleByRoleId(roleId));
    }


}
